package com.iflytek.day16;

public class ObjectDemo02 {

    public static void main(String[] args) {

        // 创建两个学生对象
        Student1 s1 = new Student1("iflytek" , "14") ;
        Student1 s2 = new Student1("iflytek" , "14") ;
        Student1 s3= new Student1("iflytek" , "13") ;

        String str1 = new String("abc");
        String str2 = new String("abc");

        // 比较两个对象是否相等
        System.out.println(s1 == s2);
        System.out.println(str1 == str2);

        System.out.println(s1.equals(s2));
        System.out.println(str1.equals(str2));

        System.out.println(s1.equals(s3));

    }

}